home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / BoingBag1 / Contributions / InstallerNG / GUI-API / example / igui_SetCopyGauge.c < prev    next >
C/C++ Source or Header  |  1999-10-28  |  1KB  |  60 lines

  1.  
  2. #include "includes.h"
  3. #include "installergui_data.h"
  4.  
  5. /********************************************************************
  6.  *
  7.  *  DESCRIPTION
  8.  *
  9.  */
  10.  
  11. /********************************************************************
  12.  *
  13.  *  STATIC
  14.  *
  15.  */
  16.  
  17. /********************************************************************
  18.  *
  19.  *  EXTERN
  20.  *
  21.  */
  22.  
  23. /********************************************************************
  24.  *
  25.  *  PUBLIC
  26.  *
  27.  */
  28.  
  29. /********************************************************************
  30.  *
  31.  *  CODE
  32.  *
  33.  */
  34.  
  35. void __asm igui_SetCopyGauge(register __a0 APTR application,
  36.                              register __a1 char *srcfile,
  37.                              register __a2 char *destfile,
  38.                              register __d0 long done)
  39. {
  40.   #ifdef DEBUG
  41.   DEBUG_MAKRO
  42.   #endif
  43.  
  44.   {
  45.     struct Application *app = (struct Application *) application;
  46.     long winstate;
  47.  
  48.     // if the gauge is currently closed, we have to open it
  49.     GetAttr(MUIA_Window_Open, app->app_GaugeWindow, (ULONG *) &winstate);
  50.     if (!winstate) { set(app->app_GaugeWindow, MUIA_Window_Open, TRUE); }
  51.  
  52.     // set the current values
  53.     set(app->app_GaugeSrc, MUIA_Text_Contents, srcfile);
  54.     set(app->app_GaugeDest, MUIA_Text_Contents, destfile);
  55.     set(app->app_GaugeGauge, MUIA_Gauge_Current, done);
  56.  
  57.     // refresh the window
  58.     guistuff_Refresh(app);
  59.   }
  60. }